package com.cws.frame.exception;

import com.cws.enmu.RspCode;

/**
 * @title 		[框架自定义异常类]
 * @description	[一句话描述]
 * @copyright	Copyright 2013 SHIPING INFO Corporation. All rights reserved.
 * @company		SHIPING INFO.
 * @author		Caspar Du
 * @version		v 1.0
 * @create		2013-6-7 下午10:30:10
 */
public class CWSException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5835820833254771018L;

	private RspCode rspCode;

	/**
	 * @param err
	 */
	public CWSException(RspCode code) {
		super(code.getDescription());
		this.rspCode = code;
	}

	/**
	 * @param err
	 * @param cause
	 */
	public CWSException(RspCode rspCode, Throwable cause) {
		super(rspCode.getDescription(), cause);
		this.rspCode = rspCode;
	}

	public RspCode getRspCode() {
		return rspCode;
	}
}
